package com.ruyuan.eshop.common.bean;

import org.springframework.context.ApplicationContext;

/**
 * @author lxg
 * @Description:ioc容器
 * @date 2022/4/622:59
 */
public class SpringApplicationContext {
    ApplicationContext context;

    public SpringApplicationContext(ApplicationContext context) {
        this.context = context;
    }

    public <T> T getBean(Class<? extends T> clazz){
        return context.getBean(clazz);
    }
}
